textbuffer: fix selection replacement when pasting
authorSébastien Wilmet <swilmet@gnome.org>
Wed, 10 Apr 2013 11:39:54 +0000 (13:39 +0200)
committerSébastien Wilmet <swilmet@gnome.org>
Mon, 16 Sep 2013 07:48:24 +0000 (09:48 +0200)
commit8e916815bbfcf943eb427c3721db0529654ac0ce
tree82808eb288ebd2afc077eb9fa974bb4a4b8f7eaa
parent28684196887d2559c6f7c077e92db7deb752087d
textbuffer: fix selection replacement when pasting

It is more logical to first delete the selection and then pasting the
text. When the selection and the text contain tags, the new behavior is
more natural.

A segfault in paste_from_buffer() is also avoided. The segfault occurs when
the text to paste is deleted because it is the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=339539
gtk/gtktextbuffer.c